{extend name="public/base" /}
{block name="theme"}权限管理{/block}
{block name="small_theme"}权限列表{/block}
{block name="content"}
<div class="col-xs-12">
    <!-- PAGE CONTENT BEGINS -->
    <div class="row">
        <div class="col-xs-12">
            {notempty name="middlerule"}
                <h3 class="header blue lighter smaller">
                    <i class="ace-icon fa fa-list-alt smaller-90"></i>
                    自动生成菜单列表
                    <i class="ace-icon fa fa-plus smaller-90 middle" data-icon-hide="ace-icon fa fa-minus" data-icon-show="ace-icon fa fa-plus"></i>
                </h3>
                <table class="table table-striped table-bordered table-hover">
                    <thead>
                    <tr>
                        <th>菜单名称</th>
                        <th>节点</th>
                        <th>样式</th>
                        <th></th>
                    </tr>
                    </thead>

                    <tbody>
                    {volist name="middlerule" id='vo'}
                    <tr>
                        <td>{$vo.title}</td>
                        <td>{$vo.name}</td>
                        <td>
                            <i class="fa {$vo.css}"></i>
                        </td>
                        <td>
                            <div class="hidden-sm hidden-xs btn-group">
                                <a class="btn btn-xs btn-success" href="{:url('addedit',['id'=>$vo['id']])}" title="新增">
                                    <i class="ace-icon fa fa-plus bigger-120"></i>
                                </a>
                                <a class="btn btn-xs btn-warning" href="javascript:opendel('{:url('delmiddle',['id'=>$vo['id']])}');" title="删除">
                                    <i class="ace-icon fa fa-trash-o bigger-120"></i>
                                </a>
                            </div>

                        </td>
                    </tr>
                    {/volist}
                    </tbody>
                </table>
            {/notempty}
            <h3 class="header blue lighter smaller">
                <i class="ace-icon fa fa-list-alt smaller-90"></i>
                新增菜单
                <a href="{:url('add')}"><i class="ace-icon fa fa-plus smaller-90 middle" data-icon-hide="ace-icon fa fa-minus" data-icon-show="ace-icon fa fa-plus"></i></a>
                &nbsp;
                &nbsp;
                &nbsp;
                <i class="ace-icon fa fa-list-alt smaller-90"></i>
                    自动导入未进入权限控制的方法
                <a href="{:url('importRule')}"><i class="ace-icon fa fa-plus smaller-90 middle" data-icon-hide="ace-icon fa fa-minus" data-icon-show="ace-icon fa fa-plus"></i></a>
            </h3>
            <table id="sample-table-1" class="table table-striped table-bordered table-hover">
                <thead>
                    <tr>
                        <th class="center">
                            <label class="position-relative">
                                <input type="checkbox" class="ace" />
                                <span class="lbl"></span>
                            </label>
                        </th>
                        <th>ID</th>
                        <th>菜单名称</th>
                        <th>节点</th>
                        <th>状态</th>
                        <th>是否检测</th>
                        <th>样式</th>
                        <th class="hidden-480">排序</th>
                        <th>
                            <i class="ace-icon fa fa-clock-o bigger-110 hidden-480"></i>
                            创建时间
                        </th>
                        <th></th>
                    </tr>
                </thead>

                <tbody>
                {volist name="authrule" id='vo'}
                    <tr>
                        <td class="center">
                            <label class="position-relative">
                                <input type="checkbox" class="ace" />
                                <span class="lbl"></span>
                            </label>
                        </td>
                        <td>{$vo.id}</td>
                        <td>{$vo._name}</td>
                        <td>{$vo.name}</td>
                        <td>
                            <a class="active-btn" href="{:url('admin/menu/menus_rule_state')}" data-id="{$vo.id}">
                                {$vo.status_text}
                            </a>
                        </td>
                        <td>{$vo.notcheck_text}</td>
                        <td>
                            {notempty name="vo.css"}
                                <i class="fa {$vo.css}"></i>
                            {else/}
                                <i class="fa fa-circle-o"></i>
                            {/notempty}
                        </td>
                        <td>{$vo.sort}</td>
                        <td>{$vo.create_time}</td>

                        <td>
                            <div class="hidden-sm hidden-xs btn-group">
                                <a class="btn btn-xs btn-success" href="{:url('add',['id'=>$vo['id']])}" title="新增">
                                    <i class="ace-icon fa fa-plus bigger-120"></i>
                                </a>
                                <a class="btn btn-xs btn-info" href="{:url('rule_copy',['id'=>$vo['id']])}" title="复制">
                                    <i class="ace-icon fa fa-copy bigger-120"></i>
                                </a>
                                <a class="btn btn-xs btn-danger" href="{:url('edit',['id'=>$vo['id']])}" title="编辑">
                                    <i class="ace-icon fa fa-edit bigger-120"></i>
                                </a>
                                <a class="btn btn-xs btn-warning" href="javascript:opendel('{:url('del',['id'=>$vo['id']])}');" title="删除">
                                    <i class="ace-icon fa fa-trash-o bigger-120"></i>
                                </a>
                            </div>

                            <div class="hidden-md hidden-lg">
                                <div class="inline position-relative">
                                    <button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown" data-position="auto">
                                        <i class="ace-icon fa fa-cog icon-only bigger-110"></i>
                                    </button>
                                    <ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close">
                                        <li>
                                            <a href="{:url('add',['id'=>$vo['id']])}" class="tooltip-info" data-rel="tooltip" title="新增">
                                                <span class="blue">
                                                    <i class="ace-icon fa fa-search-plus bigger-120"></i>
                                                </span>
                                            </a>
                                        </li>
                                        <li>
                                            <a href="{:url('edit',['id'=>$vo['id']])}" class="tooltip-success" data-rel="tooltip" title="编辑">
                                                <span class="green">
                                                    <i class="ace-icon fa fa-pencil-square-o bigger-120"></i>
                                                </span>
                                            </a>
                                        </li>

                                        <li>
                                            <a href="javascript:opendel('{:url('del',['id'=>$vo['id']])}');" class="tooltip-error" data-rel="tooltip" title="删除">
                                                <span class="red">
                                                    <i class="ace-icon fa fa-trash-o bigger-120"></i>
                                                </span>
                                            </a>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                        </td>
                </tr>
                {/volist}
                </tbody>
            </table>
        </div><!-- /.span -->
    </div><!-- /.row -->
</div><!-- /.col -->
{/block}
{block name="js"}
<script>
    highlight_subnav("{:url('index')}");
</script>
{/block}